#use "test06_parser.ml";;

let p = create ();;

let p = post 1 '\x1a' p;; (* eof *)

flush stderr;;

if accepted p then (
	begin match result p with
	| None ->
		begin match errors p with
		| [1, Expected_a] ->
			print_string "OK.\n";
		| _ ->
			raise (Failure "BAD ERRORS DETECTED!!")
		end
	| _ ->
		raise (Failure "BAD RESULT!!")
	end
) else (
	raise (Failure "NOT ACCEPTED!!")
);;
